<?php
namespace app\admin\plug;

use app\admin\library\PowerPlug;

class AdminPower extends PowerPlug{
    public function __construct(){
        parent::__construct('admin','控制中心');
        
        $user = new PowerPlug('user','管理员');

        $user->addList([
            ['power' => 'group','title' => '分组组管理'],
            ['power' => 'edit','title' => '添加-编辑管理员'],
            ['power' => 'log','title' => '查看日志'],
            ['power' => 'status','title' => '设置状态'],
            ['power' => 'resetPassword','title' => '重设密码'],
            ['power' => 'del','title' => '删除管理员']]);

        $this->add($user);

        $app = new PowerPlug('app','应用管理');
        $app->addList([
            ['power' => 'add','title' => '添加应用'],
            ['power' => 'status','title' => '修改应用状态']]);

        $this->add($app);
        $file = new PowerPlug('file','文件管理');
        $file->addList([
            ['power' => 'index','title' => '文件列表'],
            ['power' => 'add','title' => '添加文件'],
            ['power' => 'edit','title' => '编辑文件'],
            ['power' => 'del','title' => '删除文件']]);
        $this->add($file);
        
        $setting  =  new PowerPlug('setting','系统设置');
        
        $setting->addList([
            ['power' => 'system','title' => '系统参数'],
            ['power' => 'login','title' => '登陆'],
            ]);
        $this->add($setting);
    }
}